
import 'package:flutter_screenutil/screenutil.dart';
import 'package:flutter/material.dart';
import 'package:heyangkuaidai/DemonStrateModule/Components/NavigationBar.dart';
import 'package:heyangkuaidai/FrameWorkModule/Utils/SPUtils.dart';
import 'package:heyangkuaidai/DemonStrateModule/FirstPage.dart';
class LoanSignFinshPage extends StatefulWidget {
  @override
  _LoanSignFinshPageState createState() => _LoanSignFinshPageState();
}

class _LoanSignFinshPageState extends State<LoanSignFinshPage> {
  @override
  Widget build(BuildContext context) {
    ScreenUtil.init(context, width: 375, height: 667, allowFontScaling: true);
    return Scaffold(
      resizeToAvoidBottomInset: false,
      body:Container(
        decoration: BoxDecoration(
          gradient: LinearGradient(
            begin: Alignment.topLeft,
            end: Alignment.topRight,
            colors: [
              Color(0xff4663EB),
              Color(0xff51C7EF),
            ],
          ),
        ),
        child: Column(
          children: [
            SizedBox(height: MediaQuery.of(context).padding.top,),
            NavigationBar(false,title: "福祥e贷",),
            Container(
              width: ScreenUtil.screenWidth,
              height: ScreenUtil.screenHeight-MediaQuery.of(context).padding.top-ScreenUtil().setWidth(70),
              child: ListView(
                children: [
                  Column(
                    children: [
                      SizedBox(
                        height: ScreenUtil().setWidth(59),
                      ),
                      Container(
                        width: ScreenUtil().setWidth(228),
                        height: ScreenUtil().setWidth(228),
                        decoration: BoxDecoration(
                          borderRadius: BorderRadius.circular(ScreenUtil().setWidth(228)),
                          color: Colors.blue,
                        ),
                        child:Column(
                          children: [
                            SizedBox(height: ScreenUtil().setWidth(45),),
                            Container(
                              width: ScreenUtil().setWidth(80),
                              child:Text("农e贷",style: TextStyle(fontSize: ScreenUtil().setSp(17),color: Color(0xffB0DCF8)),textAlign: TextAlign.center,),
                            ),
                            SizedBox(height: ScreenUtil().setWidth(17),),
                            Container(
                              width: ScreenUtil().setWidth(200),
                              child:Text("200,000.00",style: TextStyle(fontSize: ScreenUtil().setSp(30),color: Color(0xffB0DCF8)),textAlign: TextAlign.center,),
                            ),
                            SizedBox(height: ScreenUtil().setWidth(14),),
                            Container(
                              width: ScreenUtil().setWidth(120),
                              child:Text("授信额度（元）",style: TextStyle(fontSize: ScreenUtil().setSp(14),color: Color(0xffB0DCF8)),textAlign: TextAlign.center,),
                            ),
                          ],
                        ),
                      ),
                      SizedBox(height: ScreenUtil().setWidth(29),),
                      Row(
                        children: [
                          SizedBox(width: ScreenUtil().setWidth(47),),
                          Container(
                            width: ScreenUtil().setWidth(58),
                            child:Text("年利率",style: TextStyle(fontSize: ScreenUtil().setSp(12),color: Color(0xffB0DCF8)),textAlign: TextAlign.center,),
                          ),
                          Container(
                            width: ScreenUtil().setWidth(80),
                            child:Text("4.65%",style: TextStyle(fontSize: ScreenUtil().setSp(15),color: Colors.white),textAlign: TextAlign.center,),
                          ),
                        ],
                      ),
                      SizedBox(height: ScreenUtil().setWidth(13),),
                      Row(
                        children: [
                          SizedBox(width: ScreenUtil().setWidth(47),),
                          Container(
                            width: ScreenUtil().setWidth(58),
                            child:Text("合同期限",style: TextStyle(fontSize: ScreenUtil().setSp(12),color: Color(0xffB0DCF8)),textAlign: TextAlign.center,),
                          ),
                          SizedBox(width: ScreenUtil().setWidth(10),),
                          Container(
                            width: ScreenUtil().setWidth(160),
                            child:Text("2019.6.25-2022.6.25",style: TextStyle(fontSize: ScreenUtil().setSp(15),color: Colors.white),textAlign: TextAlign.center,),
                          ),
                        ],
                      ),
                      SizedBox(height: ScreenUtil().setWidth(13),),
                      Row(
                        children: [
                          SizedBox(width: ScreenUtil().setWidth(47),),
                          Container(
                            width: ScreenUtil().setWidth(58),
                            child:Text("还款方式",style: TextStyle(fontSize: ScreenUtil().setSp(12),color: Color(0xffB0DCF8)),textAlign: TextAlign.center,),
                          ),
                          Container(
                            width: ScreenUtil().setWidth(80),
                            child:Text("等额本息",style: TextStyle(fontSize: ScreenUtil().setSp(15),color: Colors.white),textAlign: TextAlign.center,),
                          ),
                        ],
                      ),
                      SizedBox(height: ScreenUtil().setWidth(13),),
                      Row(
                        children: [
                          SizedBox(width: ScreenUtil().setWidth(47),),
                          Container(
                            width: ScreenUtil().setWidth(58),
                            child:Text("还款日期",style: TextStyle(fontSize: ScreenUtil().setSp(12),color: Color(0xffB0DCF8)),textAlign: TextAlign.center,),
                          ),
                          Container(
                            width: ScreenUtil().setWidth(80),
                            child:Text("每月12日",style: TextStyle(fontSize: ScreenUtil().setSp(15),color: Colors.white),textAlign: TextAlign.center,),
                          ),
                        ],
                      ),
                      SizedBox(height: ScreenUtil().setWidth(20),),
                      Row(
                        children: [
                          SizedBox(width: ScreenUtil().setWidth(138),),
                          Container(
                            color: Colors.orange ,
                            child: Text("恭喜您签约成功",style: TextStyle(fontSize: ScreenUtil().setSp(13),color: Color(0xffFFFFFF)),textAlign: TextAlign.center),
                          ),
                          // Stack(
                          //   children: [
                          //     Container(
                          //       width: ScreenUtil().setWidth(120),
                          //       height: ScreenUtil().setWidth(30),
                          //       color: Colors.orange ,
                          //     ),
                          //     Positioned(
                          //         top: ScreenUtil().setWidth(3),
                          //         left: ScreenUtil().setWidth(5),
                          //         child: Container(
                          //           child: Text("恭喜您签约成功",style: TextStyle(fontSize: ScreenUtil().setSp(13),color: Color(0xffFFFFFF)),textAlign: TextAlign.center),
                          //         )
                          //     ),
                          //   ],
                          // ),
                        ],
                      ),
                      SizedBox(height: ScreenUtil().setWidth(14),),
                      InkWell(
                        onTap: (){
                          SPUtils.save("status", "No");
                          Navigator.of(context).pushAndRemoveUntil(
                            //跳转
                              new MaterialPageRoute(builder: (context) => new FirstPage()),
                              //清除其他路由
                                  (route) => route == null
                          );
                        },
                        child: Container(
                            decoration: BoxDecoration(
                              gradient: LinearGradient(
                                begin: Alignment.topCenter,
                                end: Alignment.bottomCenter,
                                colors: [
                                  Color(0xffFFFFFF),
                                  Color(0xffBCE8FE),
                                ],
                              ),
                              borderRadius: BorderRadius.circular(ScreenUtil().setWidth(36)),
                              boxShadow: [
                                BoxShadow(
                                    color: Color(0xff368FB7),
                                    offset: Offset(0, 2.0), //阴影y轴偏移量
                                    blurRadius: 4.0, //阴影模糊程度
                                    spreadRadius: 0 //阴影扩散程度
                                )
                              ],

                            ),
                            width: ScreenUtil().setWidth(288),
                            height: ScreenUtil().setWidth(44),
                            child:Center(
                              child: Text("去用款",style: TextStyle(fontSize: ScreenUtil().setSp(17),color: Color(0xff41A5EE)),textAlign: TextAlign.center,),
                            )
                        ) ,
                      ),
                      SizedBox(height: ScreenUtil().setWidth(22),),
                      Container(
                        width: ScreenUtil().setWidth(200),
                        child:Text("查看《最高额借款合同》",style: TextStyle(fontSize: ScreenUtil().setSp(14),color: Color(0xffFFECC5)),textAlign: TextAlign.center,),
                      ),
                    ],
                  )
                ],
              ),
            )
            
          ],
        ),
      ),
    );
  }
}
